package rpc.frame.client.config;

import org.I0Itec.zkclient.ZkClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import rpc.frame.client.discovery.zk.ZkServiceDiscovery;

import javax.annotation.Resource;

@Configuration
public class zkClientConfig {

    @Resource
    private RpcClientConfiguration rpcClientConfiguration;

    @Bean
    public ZkClient zkClient(){
        return new ZkClient(rpcClientConfiguration.getZkAddr(),rpcClientConfiguration.getConnectTimeout());
    }
}
